-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submit Adagrams code #9
base: master
Are you sure you want to change the base?
Conversation
rubric: new format, comp qs -> reflection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, you hit the learning goals here. Well done.
@@ -0,0 +1,86 @@ | |||
require 'csv' | |||
|
|||
def draw_letters() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
return hand | ||
end | ||
|
||
def uses_available_letters?(input, letters_in_hand) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
return true | ||
end | ||
|
||
def score_word(word) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I love the use of a hash here.
def is_in_english_dict?(input) | ||
dict = CSV.read('assets/dictionary-english.csv') | ||
dict.include?([input.downcase]) ? true : false | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Very compact and readable.
return score | ||
end | ||
|
||
def highest_score_from(words) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Well done
Assignment Submission: Adagrams
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection
Enumerable
mixin? If so, where and why was it helpful?